﻿using System.Windows.Forms;

namespace QAToolsAddin.GenericDialogs.Fields {
    public class FieldLabel : Field, IField {
        readonly TextBox _control;

        public FieldLabel(string name, string info, string value)
            : base(name, info, false) {
            _control = new TextBox {
                ReadOnly = true,
                Text = value
            };
        }

        public override Control Control {
            get { return _control; }
        }

        public string Value {
            get { return _control.Text; }
            set { _control.Text = value; }
        }

        object IField.Value {
            get { return Value; }
            set { Value = (string)value; }
        }

    }
}
